const Base = require('./base.js');

module.exports = class extends Base {
  __before() {
    super.__before();
    this.imgService = think.rpc.img.image;
  }
  async uploadAction() {
    const imgUrl = await this.imgService.saveImageFile(this.file('file'));
    return this.success(imgUrl);
  }
};
